package com.example.tys.daggermvp.mvp.view;

import android.os.Bundle;
import android.util.Log;
import android.view.View;
import android.widget.Toast;

import com.example.tys.daggermvp.BaseActivity;
import com.example.tys.daggermvp.R;
import com.example.tys.daggermvp.mvp.contract.MainActivity2Contract;
import com.example.tys.daggermvp.mvp.presenter.MainActivity2Presenter;

import javax.inject.Inject;
import javax.inject.Named;

public class Main2Activity extends BaseActivity<MainActivity2Contract.Presenter, MainActivity2Contract.View,MainActivity2Contract.Date>
        implements MainActivity2Contract.View {

    @Inject
    PlusOneFragment fragment;

    @Inject
    PlusOneFragment fragment2;

    @Inject
    PlusOneFragment fragment3;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main2);
    }


    public void m2(View view) {
        mPresenter.mwbt(view);
    }

    @Override
    public void mwbt(android.view.View view) {
        Toast.makeText(this, "fragmem", Toast.LENGTH_SHORT).show();
        getSupportFragmentManager().beginTransaction()
                .add(R.id.fl, fragment).commit();
    }
}
